
#ifndef _PROCESSROUTER_THREAD_H_
#define _PROCESSROUTER_THREAD_H_

#include "config.h"
#include <unistd.h>
#include <string>
#ifndef Q_MOC_RUN
#include <boost/thread/thread.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/locks.hpp>
#include <boost/asio.hpp>
#include <boost/bind.hpp>
#include <boost/function.hpp>
#endif

namespace ProcessRouter {

class Thread {
    public:
        Thread();
        ~Thread();

        void start();
        void stop();

        void run();

        virtual void threadMain() {}

        std::string tid();
        int pid();

        bool running()
        { return m_running; }

    protected:
        bool m_stop;

    private:
        std::string m_tid;
        pid_t m_pid;
        bool m_running;
};

} // namespace end

#endif

